<%@page contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>工程发票申请</title>
<%@ include file="../common/common.jsp"%>
<script type="text/javascript">
var basePath=<%=request.getContextPath()+"/"%>;

$(function(){
    var height = window.document.body.offsetHeight-50;
	$('#client_info').datagrid({ 
		height:height,
		fitColumns:true,
		//fit:true,
		pagination:true,//分页数据
		rownumbers: true,
		loadMsg:'正在加载数据,请稍后',
		pageSize:10,
		url:basePath+'contractInfoAction!loadMainContractInfo.do',
		toolbar:[{text:"新增",iconCls:"icon-add",handler:function(){
			$('#win').window('open');
			
		}},{text:"编辑",iconCls:"icon-edit",handler:function(){
			$('#win').window('open');
		}},{text:"删除",iconCls:"icon-no",handler:function(){
			 $.messager.confirm('信息提示','你是否要删除当前选中数据?',function(r){  
				  if(r){
					  $.messager.alert('信息提示','删除成功');
				  }
			 });
		}},{text:"提交审批",handler:function(){
			$('#appwin').window('open');
		}}],
		columns:[[  
		          {field:'clientcode',title:'合同编号',width:100},  
		          {field:'clientname',title:'付款单位',width:100},  
		          {field:'clientcontract',title:'发票金额',width:100},  
		          {field:'clientcomaddr',title:'合同金额',width:100},  
		          {field:'clientsellname',title:'回款金额',width:100},
		          {field:'clientname',title:'汇款时间',width:100},  
		          {field:'clientcontract',title:'申请人',width:100},  
		          {field:'clientcomaddr',title:'申请时间',width:100},  
		          {field:'clientsellname',title:'补充说明',width:100}
	    ]]

	});
	
	$('#app_add').datagrid({ 
		width:'100%',
		height:160,
		fitColumns:true,
		pagination:true,//分页数据
		rownumbers: true,
		pageSize:10,
		loadMsg:'正在加载数据,请稍后',
		url:'datagrid_user.json',
		columns:[[  
		          {field:'USERNAME',title:'用户名',width:200},  
		          {field:'DEPTNAME',title:'部门',width:200}
		         ]]
	});
	
	$('#app_close').click(function(){
		$('#appwin').window('close');
	});
	
	 $('#win').window({  
		 closable:true,
		 modal:true  
	 });

	
	$('#add_close').click(function(){
		$('#win').window('close');
	});
});
</script>
</head>
<body class="easyui-layout">
<div id="win"  class="easyui-dialog" title="新增工程发票" closed="true" minimizable="false"
 maximizable="false" collapsible="false" style="width:650px;height:360px;padding:5px;" href=order_form.jsp>
</div>


<div id="appwin"  class="easyui-dialog" title="提交审批" closed="true" minimizable="false"
 maximizable="false" collapsible="false" style="width:650px;height:300px;padding:5px;">
    <form> 
        <div fit="true">
	            <div region="center" border="false" style="width:100%;height:250;padding:0px;background:#fff;border:false;">
			        <table id="app_add"  style="width: 100%;";>
							
					</table>
				</div>
				
				 <div region="south" border="false" style="text-align:center;margin-top:50px;padding:5px 0;">
					<a class="easyui-linkbutton" iconCls="icon-ok" href="javascript:void(0)">发起</a>
					<a id="app_close" class="easyui-linkbutton" iconCls="icon-cancel" href="javascript:void(0)" >取消</a>
			     </div>
        </div>
    </form> 
</div>
 
   <div region="center"  title="发票信息" closable="false" >
         <table id="client_info"></table>  
  </div>
</body>
</html>